package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.RecordPictureMapper;
import com.ruoyi.business.domain.RecordPicture;
import com.ruoyi.business.service.IRecordPictureService;

/**
 * 识别图片Service业务层处理
 * 
 * @author asher
 * @date 2021-11-28
 */
@Service
public class RecordPictureServiceImpl implements IRecordPictureService 
{
    @Autowired
    private RecordPictureMapper recordPictureMapper;

    /**
     * 查询识别图片
     * 
     * @param recordPictureId 识别图片主键
     * @return 识别图片
     */
    @Override
    public RecordPicture selectRecordPictureByRecordPictureId(Long recordPictureId)
    {
        return recordPictureMapper.selectRecordPictureByRecordPictureId(recordPictureId);
    }

    /**
     * 查询识别图片列表
     * 
     * @param recordPicture 识别图片
     * @return 识别图片
     */
    @Override
    public List<RecordPicture> selectRecordPictureList(RecordPicture recordPicture)
    {
        return recordPictureMapper.selectRecordPictureList(recordPicture);
    }

    /**
     * 新增识别图片
     * 
     * @param recordPicture 识别图片
     * @return 结果
     */
    @Override
    public int insertRecordPicture(RecordPicture recordPicture)
    {
        recordPicture.setCreateTime(DateUtils.getNowDate());
        return recordPictureMapper.insertRecordPicture(recordPicture);
    }

    /**
     * 修改识别图片
     * 
     * @param recordPicture 识别图片
     * @return 结果
     */
    @Override
    public int updateRecordPicture(RecordPicture recordPicture)
    {
        recordPicture.setUpdateTime(DateUtils.getNowDate());
        return recordPictureMapper.updateRecordPicture(recordPicture);
    }

    /**
     * 批量删除识别图片
     * 
     * @param recordPictureIds 需要删除的识别图片主键
     * @return 结果
     */
    @Override
    public int deleteRecordPictureByRecordPictureIds(Long[] recordPictureIds)
    {
        return recordPictureMapper.deleteRecordPictureByRecordPictureIds(recordPictureIds);
    }

    /**
     * 删除识别图片信息
     * 
     * @param recordPictureId 识别图片主键
     * @return 结果
     */
    @Override
    public int deleteRecordPictureByRecordPictureId(Long recordPictureId)
    {
        return recordPictureMapper.deleteRecordPictureByRecordPictureId(recordPictureId);
    }
}
